#include "bsp_mxc6655.h"
#include "main.h"
#include "usart.h"
extern I2C_HandleTypeDef hi2c1;

float getAccel(uint8_t axis, uint8_t range)
{
	
}
	
int updateAccelAll()
{
	
}
uint8_t MXC6655_Read(uint8_t addr, uint8_t* data, uint8_t numReadToBytes)
{
	float hum, temp;
	uint8_t HumValue, TempValue;
 
	if (HAL_I2C_Master_Transmit(&hi2c1, MXC_CMD_DEV_WRITE, (uint8_t*)&addr, 1, 1000) != HAL_OK) 
	{
		Error_Handler();
	}
	HAL_I2C_Master_Receive(&hi2c1, MXC_CMD_DEV_READ, data, numReadToBytes, 1000);
	return 0;
}
	
float getTemp()
{
	
}
void mxc_example(void)
{
	uint8_t tmpdat[16] = { 0 };
	MXC6655_Read(0x00, tmpdat, 16);
	u1_printf("mxcid:%02x-%02x\r\n", tmpdat[0x0e], tmpdat[0x0f]);
}
